package com.csust.travel.controller;


import cn.dev33.satoken.annotation.SaCheckLogin;
import com.csust.travel.common.Result;
import com.csust.travel.entity.ProductType;
import com.csust.travel.model.Page;
import com.csust.travel.model.R;
import com.csust.travel.service.ProductTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/product/type")
//@SaCheckLogin
public class ProductTypeController {

    @Autowired
    private ProductTypeService productTypeService;


    @GetMapping
    public R<List<ProductType>> getTypeList(){
        List<ProductType> list = productTypeService.list();
        return R.ok(list);
    }



}
